// pages/component/menu/menu.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {

    menuItems:[
      {id:'0',name:'早餐'},
      {id:'1',name:'午餐'},
      {id:'2',name:'晚餐'},
      {id:'3',name:'甜品'},
      {id:'4',name:'急急撒sdsd丁萨答打sdsd萨打撒急'},
    ],selectedMenuItem: '0'
  },
  /**
   * 组件的方法列表
   */
  methods: {
    selectMenuItem: function(e) {
      const menuItemId = e.currentTarget.dataset.id;
      console.log(menuItemId);
      this.setData({
        selectedMenuItem: menuItemId
      });
    },
  }
})